package cn.edu.sjtu.se.peakfactory.dao.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.edu.sjtu.se.lchang.socialnetwork.dao.bean.User;

@Entity
@Table(name = "PEAK_FACTORY_GAME_PROFILE_TABLE")
public class GameProfile {
	private Long id;
	private User user;
	private Game game;

	private Date registerTime;
	private Integer hours;

	private Integer level;
	private Boolean nullified;

	// TODO
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name = "GAME_ID")
	public Game getGame() {
		return game;
	}

	public void setGame(Game game) {
		this.game = game;
	}

	@Column(name = "REGISTER_TIME")
	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	@Column(name = "GAME_HOURS")
	public Integer getHours() {
		return hours;
	}

	public void setHours(Integer hours) {
		this.hours = hours;
	}

	@Column(name = "GAME_LEVEL")
	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	@Column(name = "IS_NULLIFIED")
	public Boolean getNullified() {
		return nullified;
	}

	public void setNullified(Boolean nullified) {
		this.nullified = nullified;
	}

}
